home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Apr 90 / MacApp.Tech$ 4⁄27⁄90 / 1187-Re T.Pascal3 Case st-Apr90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  37 lines  |  [TEXT/GEOL]

  1. Item    9804879                         23-April-90        16:19PDT
  2.  
  3. From:   NEAL                            Symantec, David Neal,PRT
  4.  
  5. To:     CHADWICK1                       Attain, Dan Chadwick,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Re: T.Pascal3 Case statements
  10.  
  11. <I think I have found a problem with using Think Pascal 3.0 with MacApp.  MPW
  12. <defines the action for a case statement when the selector doesn't match any of
  13. <the case constants and when there is no otherwise clause as a no-op, whereas
  14. <TP 3.0 defines this (according to p. 292 of the manual) as an "error."
  15. <Version 2 of LSP often crashed with this type of error.
  16.  
  17. <TView.ComputeSize uses the MPW behavior for variable sized views.  This would
  18. <seem to be a problem.  Can anyone (are you listening Symantec?) comment on
  19. <either the state of the TP 3.0 compiler perhaps a revised source converter?
  20.  
  21. Dan,
  22.  
  23. While THINK Pascal does define this as an error, a runtime error is only
  24. generated when the R (range checking) option is on.  A case selector that does
  25. not match a case label and there being no otherwise clause would seem to
  26. indicate an error in the program.  Sometimes it is helpful for this condition
  27. to be reported.  But you can work around it either by adding an empty otherwise
  28. clause or turning off range checking {$R-} for that procedure.
  29.  
  30. I'm not sure if we should try to fix this or if the fix should be in MacApp.  I
  31. can probably be convinced if people strongly feel that we should make the
  32. source converter work fix this.
  33.  
  34. David Neal
  35.  
  36.  
  37.